package com.pojo;


import java.util.Objects;

public class User {

    private Integer id;
    private String username;
    private String password;
    private String role;
    private Integer manId;
    private String phone;
    private String email;
    private Integer buyManerId;

    public User() {
    }

    public User(Integer id, String username, String password, String role, Integer manId, String phone, String email, Integer buyManerId) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.role = role;
        this.manId = manId;
        this.phone = phone;
        this.email = email;
        this.buyManerId = buyManerId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public Integer getManId() {
        return manId;
    }

    public void setManId(Integer manId) {
        this.manId = manId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getBuyManerId() {
        return buyManerId;
    }

    public void setBuyManerId(Integer buyManerId) {
        this.buyManerId = buyManerId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(username, user.username) && Objects.equals(password, user.password) && Objects.equals(role, user.role) && Objects.equals(manId, user.manId) && Objects.equals(phone, user.phone) && Objects.equals(email, user.email) && Objects.equals(buyManerId, user.buyManerId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, password, role, manId, phone, email, buyManerId);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", role='" + role + '\'' +
                ", manId=" + manId +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", buyManerId=" + buyManerId +
                '}';
    }
}
